home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
Libraries
/
usr (gcc 1.37 libs)
/
mac
/
setjmp.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-03-20
|
697b
|
27 lines
#include <setjmp.h>
void longjmp(jmp_buf saved, int result)
{
asm ("unlk a6\n"
" movel a7@+,a1\n"
" movel a7@+,d0\n"
" movel a7@+,a0\n"
" tstl d0\n"
" bne _1\n"
" moveq #1,d0\n"
"_1: moveml a0@,d3-d7/a1-a4/a6-a7\n"
" jmp a1@\n"
);
}
int setjmp (jmp_buf save)
{
asm ("unlk a6\n"
" movel a7@+,a1\n"
" movel a7@,a0\n"
" moveq #0,d0\n"
" moveml d3-d7/a1-a4/a6/a7,a0@\n"
" jmp a1@\n"
);
}